package main

import (
	"fmt"
	"images-bed/config"
	"images-bed/hippo"
	"images-bed/papers"
)

var (
	boot *hippo.Hippo
	err  error
)

func main() {

	if papers.InitPapers() {
		// 开启监听
		boot, err = hippo.NewBoot(
			config.GetConfig().Host,
			config.GetConfig().Port,
			config.GetConfig().Protocol,
		)
		if err != nil {
			return
		}

		boot.Start()

		boot.Accept()
	} else {
		fmt.Println("文件系统初始化失败")
	}
}
